using System.Collections.Generic;
using UnityEngine;
using GameFramework;

namespace LS
{
    public class VarList<T> : Variable<List<T>>
    {
        /// <summary>
        /// 初始化 System.Int16 变量类的新实例。
        /// </summary>
        public VarList(): base()
        {
        }
        /// <summary>
        /// 从 System.Numerics.BigInteger 到 VarBigInteger 变量类的隐式转换。
        /// </summary>
        /// <param name="value">值。</param>
        public static implicit operator VarList<T>(List<T> value)
        {
            VarList<T> varValue = ReferencePool.Acquire<VarList<T>>();

            varValue.Value = value;
            return varValue;
        }

        /// <summary>
        /// 从 System.VarBigInteger 变量类到 System.Numerics.BigInteger 的隐式转换。
        /// </summary>
        /// <param name="value">值。</param>
        public static implicit operator List<T>(VarList<T> value)
        {
            return value.Value;
        }
    }
}
